const express = require('express');
const router = express.Router();
const gameController = require('../controllers/gameController');
const { authenticate } = require('../middleware/auth');

// 所有路由都需要认证
router.use(authenticate);

router.post('/record', gameController.recordGameResult);
router.get('/history', gameController.getGameHistory);
router.get('/leaderboard', gameController.getGameLeaderboard);
router.get('/random-words', gameController.getRandomWords);

module.exports = router;

